package com.example.yuejian23.yuejian_23.service;

import com.example.yuejian23.yuejian_23.javaBean.GerenBean;
import com.example.yuejian23.yuejian_23.javaBean.LoginBean;
import com.example.yuejian23.yuejian_23.javaBean.RegBean;
import com.example.yuejian23.yuejian_23.javaBean.Result;
import com.example.yuejian23.yuejian_23.javaBean.UserBean;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by dong on 2017/9/27.
 */

public interface UserService {
    @GET("Login/login/")
    Call<LoginBean> userLogin(@Query("utel")String username,
                              @Query("pwd")String passsword);
    @GET("Reg/reguser/")
    Call<RegBean>userReg(@Query("uname")String name,
                         @Query("utel")String username,
                         @Query("pwd")String password);
    //http://localhost/new18yuejian/api.php/Users/getuserinfo/uid/1

    @GET("Users/getuserinfo/")
    Call<GerenBean> getuserinfo(@Query("uid")String uid);

    @Multipart
    @POST("Users/fileupuserspic")
    Call<ResponseBody> mupload(
            @Query("uid")String uid,
            @Part MultipartBody.Part file
    );
    @GET("Users/updata")
    Call<Result> updateUserInfoById(@Query("uid") String userId,
                                    @Query("uname") String userName,
                                    @Query("utel") String userPhone);


}
